package demo

import java.sql.{Date => sqlDate}
import java.util.{Date => utilDate}


object Objectx {
  def main(args: Array[String]): Unit = {
    var arr = Array[Int](21, 21, 32, 43)

    for (elem <- arr) {

      println(elem)
    }
  }

  var date1 = new sqlDate(212)

  var date2 = new utilDate(221)


  var a = parent.getInstance
  a.setName("fuck~")

  println(a.getName)
}


class parent private() {
  private var name: String = _

  def setName(name: String) = this.name = name

  def getName = this.name
}

object parent {

  private val parent = new parent

  def getInstance = parent


}


package object pak {
  def fun = println("hello world~")
}
